import request from "@/utils/request";

// 查询物料领用列表
export function listMaterialuse(query) {
  return request({
    url: "/mes/materialuse/list",
    method: "get",
    params: query,
  });
}
// 查询物料领用详细
export function getMaterialuse(id) {
  return request({
    url: "/mes/materialuse/" + id,
    method: "get",
  });
}
// 新增物料领用
export function addMaterialuse(data) {
  return request({
    url: "/mes/materialuse",
    method: "post",
    data: data,
  });
}
// 修改物料领用
export function updateMaterialuse(data) {
  return request({
    url: "/mes/materialuse",
    method: "put",
    data: data,
  });
}
// 删除物料领用
export function delMaterialuse(id) {
  return request({
    url: "/mes/materialuse/" + id,
    method: "delete",
  });
}

// 查询物料机台领用明细列表（退库用到）
export function detailMaterialuse(query) {
  return request({
    //url: "/mes/materialuse/detail",
    url: "/mes/material/machine",
    method: "get",
    params: query,
  });
}

// 查询领用明细列表
export function machineDetail(query) {
  return request({
    //url: "/mes/materialuse/detail",
    url: "/mes/material/machineDetail",
    method: "get",
    params: query,
  });
}

